<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="generator" content="made with love by dartdoc 5.1.0-dev">
  <meta name="description" content="shelf_swagger_ui API docs, for the Dart programming language.">
  <title>shelf_swagger_ui - Dart API docs</title>


  
  <link rel="preconnect" href="https://fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  
  <link rel="stylesheet" href="static-assets/github.css?v1">
  <link rel="stylesheet" href="static-assets/styles.css?v1">
  <link rel="icon" href="static-assets/favicon.png?v1">

  
</head>


<body data-base-href=""
      data-using-base-href="false">

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li class="self-crumb">shelf_swagger_ui package</li>
  </ol>
  <div class="self-name">shelf_swagger_ui</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>


  <div id="dartdoc-main-content" class="main-content">
      
<section class="desc markdown">
  <h1 id="shelf-swaggerui">Shelf SwaggerUI</h1>
<p>Present, clean and professional documentation with Swagger + shelf;</p>
<h2 id="example">Example</h2>
<p>Get a YAML or JSON schema file. Ex: (specs/swagger.yaml)</p>
<pre class="language-yaml"><code class="language-yaml">openapi: 3.0.0
info:
  description: "API system"
  version: "1.0.10"
  title: "Swagger Test"
servers:
  - url: http://my-service.info
    description: Remote server
tags:
- name: "user"
  description: "Access to User"

</code></pre>
<p>Configure the handler with Shelf:</p>
<pre class="language-dart"><code class="language-dart">import 'package:shelf/shelf_io.dart' as io;
import 'package:shelf_swagger_ui/shelf_swagger_ui.dart';

void main(List&lt;String&gt; args) async {
  final path = 'specs/swagger.yaml';
  final handler = SwaggerUI(path, title: 'Swagger Test');
  var server = await io.serve(handler, '0.0.0.0', 4001);
  print('Serving at http://${server.address.host}:${server.port}');
}
</code></pre>
<p>That`s it!</p>
</section>


      <section class="summary">
          <h2>Libraries</h2>
        <dl>
          <dt id="shelf_swagger_ui">
  <span class="name"><a href="shelf_swagger_ui/shelf_swagger_ui-library.html">shelf_swagger_ui</a></span> 

</dt>
<dd>Present, clean and professional documentation with Swagger + shelf;
</dd>

        </dl>
      </section>

  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
  <form class="search-sidebar" role="search">
    <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
  <li class="self-crumb">shelf_swagger_ui package</li>
</ol>


    <h5 class="hidden-xs"><span class="package-name">shelf_swagger_ui</span> <span class="package-kind">package</span></h5>
    <ol>
      <li class="section-title">Libraries</li>
      <li><a href="shelf_swagger_ui/shelf_swagger_ui-library.html">shelf_swagger_ui</a></li>
</ol>

  </div>

  <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
  </div>

</main>

<footer>
  <span class="no-break">
    shelf_swagger_ui
      0.1.2
  </span>

  
</footer>



<script src="static-assets/highlight.pack.js?v1"></script>
<script src="static-assets/script.js?v1"></script>



</body>

</html>

